import {createRouter ,createWebHashHistory} from "vue-router";
import type {RouteRecordRaw} from "vue-router";

const routes:RouteRecordRaw[] = [
    {
        path: '/',
        redirect: '/login'
    },{
        path: '/login',
        name: 'login',
        component: () => import('@/view/LoginView.vue'),
        meta: {
            title: '登录',
            key: 'login'
        }
    },
    {
        path: '/home',
        name: 'home',
        component: () => import('@/view/HomeView.vue'),
        meta: {
            title: '首页',
            key: 'home'
        }
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router